Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@toyeshhm is attempting to deploy a commit to the Skeleton Labs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
@toyeshhm Thanks for the PR but if this is an issue with how Zag's splitter works we should open a PR in ZagJS, not here. We rely on consistent behaviour from ZagJS, we do not steer away or patch their mistakes. |
Linked Issue(s)
Closes #4007
Description
With
numOfMonths={2}, every day in the second month's table is disabled, even when the cell gets thevisibleRangefromgetOffset().DatePicker.TableCell(Svelte and React) splits its props with zag'ssplitTableCellProps, which only keepsdisabled,valueandcolumns.visibleRangefalls into the leftover props. So it never reachesgetDayTableCellProps/getDayTableCellTriggerProps, and it is spread onto the<td>asvisiblerange="[object Object]". Without it, zag checks each cell against the default one-month range starting at the first visible month. Every day of the second month counts as outside the range and gets disabled. zag 1.47.0 (the latest) still splits the same way.The fix pulls
visibleRangeout before the split and adds it back to the cell props. Those props go to zag and into the table cell context, soTableCellTriggergets it too. WhenvisibleRangeis not set, zag still falls back to its default range, so single-month pickers behave the same.Tests: the date picker fixtures in both packages now have a cell for 1970-02-15 with a February 1970
visibleRange, and a newTableCelltest checks that the cell has noaria-disabledorvisibleRangeattribute and that its trigger has nodata-disabled. Before the fix the test fails in both packages because the cell isaria-disabled. After the fix it passes.pnpm test,pnpm check,pnpm lint:checkandpnpm format:checkall pass.Checklist
Please read our contribution requirements and make sure you have:
docs/,feature/,task/,bugfix/mainbranch/packages)Changesets
View our documentation to learn more about changesets. To create a changeset:
pnpm changesetand follow the prompts